package com.macro.mall.tiny.nosql.mongodb.repository;

import com.macro.mall.tiny.nosql.mongodb.ducument.MemberReadHistory;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

/**
 * @author kenny
 * @version 1.0
 * @description TODO 会员商品浏览历史Repository
 * @date 2023/11/5 17:53
 */
public interface MemberReadHistoryRepository extends MongoRepository<MemberReadHistory,String> {


    /**
     * @description TODO 根据会员ID按时间倒序获取浏览记录
     * @param memberId    会员ID
     * @return java.util.List<com.macro.mall.tiny.nosql.mongodb.ducument.MemberReadHisttory>
     * @author kenny
     * @date 2023/11/5 17:55
    */
    List<MemberReadHistory> findByMemberIdOrOrderByCreateTimeDesc(Long memberId);

}
